/**   
* @Title: FrequencyStruct.java
* @Package org.xaoyaoyao.cloud.web.limit
* @Description: TODO
* @author xaoyaoyao
* @date Feb 11, 2019 2:35:13 PM
* @version V1.0   
*/
package org.xaoyaoyao.cloud.web.limit;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
* @ClassName: FrequencyStruct
* @Description: TODO
* @author xaoyaoyao
* @date Feb 11, 2019 2:35:13 PM
* 
*/
public class FrequencyStruct implements Serializable {

	private static final long serialVersionUID = -7036826965230358408L;
	
	public String uniqueKey;
	public long start;
	public long end;
	public int time;
	public int limit;
	public List<Long> accessPoints = new ArrayList<Long>();

	public void reset(long timeMillis) {
		start = end = timeMillis;
		accessPoints.clear();
		accessPoints.add(timeMillis);
	}

	@Override
	public String toString() {
		return "FrequencyStruct [uniqueKey=" + uniqueKey + ", start=" + start + ", end=" + end + ", time=" + time + ", limit=" + limit + ", accessPoints=" + accessPoints + "]";
	}
}